<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% block linkcss %}
        <!-- CSS-->
        <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/main.css') }}">
        <!-- Font-icon css-->
        <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/font-awesome.min.css') }}">
    {% endblock %}
    <title>{% block title %}{% endblock %}</title>
</head>
<body class="sidebar-mini fixed">
    <div class="wrapper">
        <!-- Navbar-->
        <header class="main-header hidden-print"><a class="logo" href="{{ url_for('view.index') }}">电梯维保管理系统</a>
            <nav class="navbar navbar-static-top">
                <!-- Sidebar toggle button-->
                <a class="sidebar-toggle" href="#" data-toggle="offcanvas"></a>
                <div class="navbar-custom-menu">
                    <ul class="top-nav">
                        <li><span>{% block current_username %}{% endblock %}</span></li>
                        <li class="dropdown">
                            <a class="dropdown-toggle" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user fa-lg"></i></a>
                            <ul class="dropdown-menu settings-menu">
                                <li><a href="{{ url_for('view.user_pwd_change') }}"><i class="fa fa-cog fa-lg"></i>修改密码</a></li>
                                <li><a href="{{ url_for('view.logout') }}"><i class="fa fa-sign-out fa-lg"></i>注销</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <!-- Side-Nav-->
        <aside class="main-sidebar hidden-print">
            <section class="sidebar">
                <div class="user-panel">
                    <div class="image">
                        <img class="img-circle" src="{{ url_for('static', filename='image/logo.png') }}" alt="User Image">
                    </div>
                </div>
                <!-- Sidebar Menu-->
                <ul class="sidebar-menu">
	                {% block nav_sidebar %}
                        {% if current_user.authority == 'super_admin' %}
                            <li><a href="{{ url_for('view.index') }}"><i class="fa fa-home fa-fw fa-lg"></i><span>首页</span></a></li>
                            <li class="treeview"><a href="#"><i class="fa fa-cog fa-fw fa-lg"></i><span>电梯</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.elevator_data_input_init') }}"><i class="fa fa-plus-square-o fa-fw"></i> 添加电梯</a></li>
                                    <li><a href="{{ url_for('view.elevator_manage') }}"><i class="fa fa-gears fa-fw"></i> 电梯管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-address-book-o fa-fw fa-lg"></i><span>员工</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.employee_data_input') }}"><i class="fa fa-id-badge fa-fw"></i> 添加员工</a></li>
                                    <li><a href="{{ url_for('view.employee_manage') }}"><i class="fa fa-id-card-o fa-fw"></i> 员工管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-file-text-o fa-fw fa-lg"></i><span>报告</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.report_generation') }}"><i class="fa fa-edit fa-fw"></i> 报告生成</a></li>
                                    <li><a href="{{ url_for('view.report_manage') }}"><i class="fa fa-files-o fa-fw"></i> 报告管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-server fa-fw fa-lg"></i><span>资料</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.report_generation') }}"><i class="fa fa-upload fa-fw"></i> 资料上传</a></li>
                                    <li><a href="{{ url_for('view.report_manage') }}"><i class="fa fa-book fa-fw"></i> 资料管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-user-o fa-fw fa-lg"></i><span>用户</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.user_register') }}"><i class="fa fa-user-plus fa-fw"></i> 添加用户</a></li>
                                    <li><a href="{{ url_for('view.user_manage') }}"><i class="fa fa-users fa-fw"></i> 用户管理</a></li>
                                </ul>
                            </li>
                        {% elif current_user.authority == 'com_admin' %}
                            <li><a href="{{ url_for('view.index') }}"><i class="fa fa-home fa-fw fa-lg"></i><span>首页</span></a></li>
                            <li class="treeview"><a href="#"><i class="fa fa-cog fa-fw fa-lg"></i><span>电梯</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.elevator_data_input_init') }}"><i class="fa fa-plus-square-o fa-fw"></i> 添加电梯</a></li>
                                    <li><a href="{{ url_for('view.elevator_manage') }}"><i class="fa fa-gears fa-fw"></i> 电梯管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-address-book-o fa-fw fa-lg"></i><span>员工</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.employee_data_input') }}"><i class="fa fa-id-badge fa-fw"></i> 添加员工</a></li>
                                    <li><a href="{{ url_for('view.employee_manage') }}"><i class="fa fa-id-card-o fa-fw"></i> 员工管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-file-text-o fa-fw fa-lg"></i><span>报告</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.report_generation') }}"><i class="fa fa-edit fa-fw"></i> 报告生成</a></li>
                                    <li><a href="{{ url_for('view.report_manage') }}"><i class="fa fa-files-o fa-fw"></i> 报告管理</a></li>
                                </ul>
                            </li>
                            <li class="treeview"><a href="#"><i class="fa fa-server fa-fw fa-lg"></i><span>资料</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.report_generation') }}"><i class="fa fa-upload fa-fw"></i> 资料上传</a></li>
                                    <li><a href="{{ url_for('view.report_manage') }}"><i class="fa fa-book fa-fw"></i> 资料管理</a></li>
                                </ul>
                            </li>
                        {% elif current_user.authority == 'com_person' %}
                            <li class="treeview"><a href="#"><i class="fa fa-file-text-o fa-fw fa-lg"></i><span>报告</span></a>
                                <ul class="treeview-menu">
                                    <li><a href="{{ url_for('view.report_generation') }}"><i class="fa fa-edit fa-fw"></i> 报告生成</a></li>
                                    <li><a href="{{ url_for('view.report_manage') }}"><i class="fa fa-files-o fa-fw"></i> 报告管理</a></li>
                                </ul>
                            </li>
                        {% endif %}
	                {% endblock %}
                </ul>
            </section>
        </aside>
        <div class="content-wrapper">
            <div class="page-title">
                <div class="">
                    <ul class="breadcrumb">
                        <li><a href="{{ url_for('view.index') }}"><i class="fa fa-home fa-lg"></i></a></li>
                        {% block page_nav %}{% endblock %}
                    </ul>
                </div>
            </div>
            <!-- 主体内容-->
            {% block content %}{% endblock %}
        </div>
    </div>
    {% block script %}
	    <!-- Javascripts-->
        <script type="text/javascript" src="{{ url_for('static', filename='js/jquery-3.4.1.min.js') }}"></script>
        <script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
	    <script type="text/javascript" src="{{ url_for('static', filename='js/main.js') }}"></script>
	{% endblock %}
</body>
</html>